//用户列表;
//获取数据;
let AccounList = async ctx =>{
    const {state}=ctx.request.body;
    let ObtainList=await ctx.db.querys(`select * from user where state='${state}'`);
    if(!ObtainList.length) return ctx.body={code:0,msg:"暂无数据",data:[]};
    return ctx.body={code:1,msg:'获取数据列表成功',data:ObtainList};
};

//课程管理;
import Lesson from '../../config/school/lesson';
let getCurriculum=async ctx=>{
    ctx.body={code:1,msg:'获取学院跟课程数据成功',data:Lesson};
}

//学院管理;
import School from '../../config/school/school';
let getSchool=ctx=>{
    ctx.body={code:1,msg:'获取学院数据成功',data:School};
}

//导出;
export default {
    AccounList,getCurriculum,getSchool
}